export const INCREMENT = "INCREMENT"
export const DECREMENT = "DECREMENT"
export const TOCHANGETITLE = "CHANGETITLE"
export const LOGIN = "LOGIN"
export const APPLYSTATUS = "APPLYSTATUS"
export const PRODUCTEXPIRE = "PRODUCTEXPIRE"
export const GROUP = "GROUP"
export const STORE = "STORE"
export const INFOLIST = "INFOLIST"
export const GROUPDETAIL = "GROUPDETAIL"
export const STOREDETAIL = "STOREDETAIL"
export const STOREALREADYOPEN = "STOREALREADYOPEN"
export const GROUPALREADYOPEN = "GROUPALREADYOPEN"
export const BIZMSGCOUNT = "BIZMSGCOUNT"
export const SYSMSGCOUNT = "SYSMSGCOUNT"
export const STORECOUNT = "STORECOUNT"
export const GROUPCOUNT = "GROUPCOUNT"
export const APPLYORDERLIST = "APPLYORDERLIST"
export const APPLYORDERDETAIL = "APPLYORDERDETAIL"
export const APPLYORDERTRACK = "APPLYORDERTRACK"
export const USERINFO = "USERINFO"
export const MODIFYUSERINFO = "MODIFYUSERINFO"
export const SERVICERINFO = "SERVICERINFO"
export const MODIFYSERVICER = "MODIFYSERVICER"
export const AREA = "AREA"
export const PROVINCE = "PROVINCE"
export const CITY = "CITY"
export const REGION = "REGION"
export const PRODUCT = "PRODUCT"
export const TENANTPUSH = "TENANTPUSH"
export const STOREPUSH = 'STOREPUSH'
export const TENANTBIND = 'TENANTBIND'
export const STOREBIND = 'STOREBIND'
export const ADDSHOPCARTOTAL ='ADDSHOPCARTOTAL'
export const SUBSHOPCARTOTAL ='SUBSHOPCARTOTAL'
export const SUBALLSHOPCARTOTAL ='SUBALLSHOPCARTOTAL'
export const WXMTSETSTOREINFO ='WXMTSETSTOREINFO'
export const onIncrement = () => ({
	test:{
		type:INCREMENT
	}
})

export const onDecrement = () => ({
	type:DECREMENT
})

export const changeNav = ( navobj ) => ({
	type:TOCHANGETITLE,
	navobj:navobj
})

export const addShopCarTotal = (json) => ({
    type:ADDSHOPCARTOTAL,
    json : json
})
export const subShopCarTotal = (price) => ({
    type:SUBSHOPCARTOTAL,
    json :price
})
export const subAllShopCarTotal = () => ({
    type:SUBALLSHOPCARTOTAL
})

export const login = ( data ) => ({
		post:{ type:LOGIN },
		data:data,
		url:'auth/login'
})
//2.2	获取业务开通申请信息接口
export const getApplyStatus = () => ({
	get:{ type:APPLYSTATUS },
	url:'home/servicer/apply/status'
})
//2.3	各业务本月到期情况
export const getProductExpire = () => ({
	get:{ type:PRODUCTEXPIRE },
	url:'home/servicer/product/expire'
})
//获取集团列表
export const getGroupList = ( data ) => ({
	post:{ type:GROUP },
	url:'bd/group/list',
	data:data
})
//获取门店列表
export const getStoreList = ( data ) => ({
	put:{ type:STORE },
	url:'bd/store/list',
	data:data
})
//获取通知列表
export const getInfoList = ( data ) => ({
	post:{ type:INFOLIST },
	url:'message/notify/list',
	data:data
})
//1.6	获取单个集团信息
export const getGroupdetail = ( groupcode ) => ({
	get:{ type:GROUPDETAIL },
	url:'bd/group/'+groupcode
})
//2.5	获取单个门店信息
export const getStoredetail = ( storecode ) => ({
	get:{ type:STOREDETAIL },
	url:'bd/store/'+storecode
})
//1.7 获取集团已开通业务信息 中国移动有 已开通业务数据  group_10012
export const getGroupopened = ( groupcode ) => ({
	get:{ type:GROUPALREADYOPEN },
	url:'bd/group/product/opened/'+groupcode
})
//2.6 获取门店开通产品  T000061 有数据
export const getStoreopened = ( storecode ) => ({
	put:{ type:STOREALREADYOPEN },
	data:{},
	url:'bd/store/open/'+storecode
})
//业务消息未读数
export const getBizMsgcount = () => ({
	get:{ type:BIZMSGCOUNT },
	url:'message/notify/count/1'
})
//系统消息未读数
export const getSysMsgcount = () => ({
	get:{ type:SYSMSGCOUNT },
	url:'message/notify/count/2'
})
//集团数量统计 /api/bd/group/statistics
export const getGroupcount = () => ({
	post:{ type:GROUPCOUNT },
	url:"bd/group/statistics",
	data:{}
})
//获取服务门店统计数量 /api/bd/store/count/
export const getStorecount = () => ({
	post:{ type:STORECOUNT },
	url:"bd/store/count",
	data:{}
})
//我的申请列表
export const getApplyOrderlist = (data) => ({
	post:{ type:APPLYORDERLIST },
	url:"bd/apply/order/list",
	data:data
})
//申请单详情 get /api/bd/apply/order/{ applyOrderNum }
export const getApplyDetail = ( ordernum ) => ({
	get:{ type:APPLYORDERDETAIL },
	url:"bd/apply/order/" + ordernum
})
//申请单跟踪 get /api/bd/apply/order/tracking/{applyOrderNum}
export const getApplyTrack = ( ordernum ) => ({
	get:{ type:APPLYORDERTRACK },
	url:"bd/apply/order/tracking/" + ordernum
})
//获取用户信息 USERINFO 已声明action的type，见左
export const getUserInfo = () => ({
	get:{ type:USERINFO },
	url:"sys/user/single"
})
//修改用户信息 MODIFYUSERINFO 已声明action的type，见左  /api/sys/user/{username}    新改 /api/sys/user/single/update
export const modifyUserinfo = ( username,data ) => ({
	post:{ type:MODIFYUSERINFO },
	url:"sys/user/single/update",
	data:data
})
//获取单个服务商的信息 SERVICERINFO /api/bd/servicer/{servicerCode} get
export const getServiceinfo = ( code ) => ({
	get:{ type:SERVICERINFO },
	url:"bd/servicer/"+code
})
//修改单个服务商的信息 MODIFYSERVICER /api/bd/servicer/{servicerCode}
export const modifyServicer = ( code,data ) => ({
	put:{ type:MODIFYSERVICER },
	url:"bd/servicer/" + code,
	data:data
})
// 获取省份信息接口 get /api/dic/province
export const getProvince = () => ({
	get:{ type:PROVINCE },
	url:"dic/province"
})
// 获取城市信息接口 get /api/dic/city/{code}
export const getCity = ( code ) => ({
	get:{ type:CITY },
	url:"dic/city/"+code
})
// 获取所有大区 get /api/dic/area
export const getArea = () => ({
	get:{ type:AREA },
	url:"dic/area"
})
// 获取行政区接口 get /api/dic/region/{code} 根据市编码cityCode获取 其下行政区信息
export const getRegion = ( code ) => ({
	get:{ type:REGION },
	url:"dic/region/"+code
})
//产品列表 /api/bd/product/list  post
export const getProduct = () => ({
	get:{ type:PRODUCT },
	url:"bd/product"
})
// 新增集团
export const tenantPush = ( data ) => ({
    post:{ type:TENANTPUSH },
    data:data,
    url:'bd/group'
})
//新增门店
export const storePush = ( data ) => ({
    post:{ type:STOREPUSH },
    data:data,
    url:'bd/store'
})

//绑定已有集团
export const tenantBind = ( data ) => ({
    post:{ type:TENANTBIND },
    data:data,
    url:'bd/group/bind'
})
//绑定已有门店
export const storeBind = ( data ) => ({
    post:{ type:STOREBIND },
    data:data,
    url:'bd/store/bind'
})

//存储美团商家填写的账户密码
export const wxmtSetStoreInfo = ( data ) => ({
    type:WXMTSETSTOREINFO,
    data:data
})